Enhanced precision background shading for digitally published text

ABSTRACT

Various techniques more precisely and reliably (a) position top and bottom boundaries of a region of background shading, (b) position left and right boundaries of a region of background shading, (c) define a region of background shading that is applied to Chinese, Japanese, or Korean characters, and (d) apply a clipping path to achieve an arbitrarily-shaped region of background shading. These techniques allow background shading to be applied to textual content precisely and reliably, and also reduce the likelihood that unwanted visual artifacts are introduced into a digital publication.

REFERENCE TO PRIOR APPLICATION

This application is a divisional of U.S. patent application Ser. No.14/942,056 (filed 16 Nov. 2015). The entire disclosure of this priorityapplication is hereby incorporated by reference herein.

FIELD OF THE DISCLOSURE

This disclosure relates generally to digital publishing, and morespecifically to techniques for precisely and reliably positioningboundaries that define a region of background shading that is applied todigitally published text.

BACKGROUND

Digital publications are becoming increasingly ubiquitous. Instead ofpurchasing and physically acquiring tangible objects such as books,magazines, and newspapers, consumers are increasingly turning to onlineapplication stores that allow them to acquire, view, and/or purchasedigital publications. As consumer demand for digitally published contenthas grown, numerous desktop publishing applications have been developedthat allow digital publishers to precisely control the appearance of thetextual and graphical objects that comprise a digital publication. Inparticular, compared to textual composition applications such as wordprocessors and text editors, desktop publishing applications afforddigital publishers a greater degree of control over visual aspects ofdigital content such as typography and graphical layout. Desktoppublishing applications therefore enable digital publishers and othercontent designers to create digital content that has a visuallyattractive appearance in terms of composition, color, transparency,borders, typography, graphical layout, and so forth. Examples ofcommercially available desktop publishing applications include Adobe®InDesign® (Adobe Systems Incorporated, San Jose, Calif.) and Microsoft®Publisher (Microsoft Corporation, Redmond, Wash.).

Particularly with respect to typography, desktop publishing applicationsprovide typesetting tools that allow digital publishers to createtextual content that is uniformly legible, readable, and visuallypleasing when rendered. For example, the typesetting tools provided bydesktop publishing applications allow digital publishers to manipulatetypographical attributes such as font, point size, line length, linespacing, margins, letter spacing, kerning, and the like. Onetypographical attribute that is particularly important to the creationof visually attractive textual content is background shading. Backgroundshading can be used to draw attention to textual content, impart adegree of organization to textual content, or simply enhance the visualappearance of textual content. As a result, many existing desktoppublishing applications also allow background shading to be applied totextual content, and to this end, are capable of positioning boundariesthat define a region of background shading.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A illustrates three text columns, each of which includes a shadedregion defined by top and bottom boundaries that are positioned based onthe shape of the glyphs present in the first and last lines of text ineach shaded region.

FIG. 1B illustrates three text columns, each of which includes a shadedregion defined by top and bottom boundaries that are positioned based onthe shape of the glyphs that comprise the fonts present in each shadedregion.

FIG. 2 illustrates a text column having an upper paragraph to whichframe width background shading has been applied, and a lower paragraphto which text width background shading has been applied.

FIG. 3A illustrates Japanese characters within a shaded region definedby boundaries that are positioned based on the shape of the glyphslocated along the edges of the shaded region.

FIG. 3B illustrates Japanese characters within a shaded region thatfills emboxes containing the Japanese characters.

FIG. 3C illustrates Japanese characters associated with a shaded regiondefined by a top boundary that is aligned with an embox centerline ofthe first line of the Japanese characters.

FIG. 4A illustrates text that is positioned within a container object,wherein the text has background shading that extends outside thecontainer object.

FIG. 4B illustrates text that is positioned within a container object,wherein the text has background shading that is contained within thecontainer object.

FIG. 5 is a block diagram schematically illustrating selected componentsof an example computer system that can be used to position boundariesthat define a region of background shading that is applied to digitallypublished text.

FIG. 6 illustrates an example user interface that can be used to definehow background shading is applied to digitally published text.

FIG. 7 is a flowchart illustrating an example method for positioningboundaries that define a region of background shading that is applied todigitally published text.

FIGS. 8A and 8B comprise a flowchart illustrating an example method forpositioning top and bottom boundaries of a region of background shadingthat is to be applied to digitally published text.

FIG. 9 is a flowchart illustrating an example method for positioningleft and right boundaries of a region of background shading that is tobe applied to digitally published text.

FIG. 10 is a flowchart illustrating a computer-implemented method forapplying background shading to textual content.

DETAILED DESCRIPTION

Because textual content is often arranged in rectangular blocks,positioning the boundaries of a region of background shading usuallyinvolves positioning top, bottom, left, and right boundaries of theshaded region. While many existing desktop publishing applications allowbackground shading to be applied to textual content, such applicationscannot precisely and reliably position the boundaries of the shadedregion, thus making it difficult for a digital publisher to achieve adesired background shading effect. Existing desktop publishingapplications also cannot accurately apply background shading tonon-rectangular (that is, arbitrarily-shaped) regions of textualcontent. In view of these shortcomings, disclosed herein are varioustechniques for more precisely and reliably (a) positioning top andbottom boundaries of a region of background shading, (b) positioningleft and right boundaries of a region of background shading, (c)defining a region of background shading that is applied to Chinese,Japanese, or Korean characters, and (d) applying a clipping path toachieve an arbitrarily-shaped region of background shading. The varioustechniques disclosed herein allow background shading to be applied totextual content precisely and reliably, and also reduce the likelihoodthat unwanted visual artifacts are introduced into a digitalpublication.

Thus, in accordance with certain of the embodiments disclosed herein,improved background shading techniques enable a user to apply backgroundshading to textual content more precisely and reliably. To accomplishthis, first user input is received that identifies the textual contentto which background shading is to be applied. And second user input isreceived that defines how a boundary of the background shading should bepositioned with respect to the identified textual content. Because thesecond user input is distinct from the first user input, it provides anadditional degree of precision beyond simply selecting a character,line, paragraph, or other segment of textual content. Once the textualcontent has been identified and the boundary of the region which is tobe shaded has been positioned, the background shading can be appliedaccordingly. Numerous configurations and modifications will be apparentin light of this disclosure.

General Overview: Top and Bottom Boundaries

Existing desktop publishing applications position the top and bottomboundaries of a region of background shading based on the shape of theglyphs present in the first and last lines of text in the shaded region.For example, a line of text having a glyph with a relatively largeascent (that is, tall glyphs such as “b”, “d”, and “f”) will have alarger region of background shading than a line of text having onlyglyphs with relatively small ascent (that is, short glyphs such as “a”,“c”, and “e”). Likewise, a line of text having glyphs with a descent(that is, glyphs such as “g”, “j”, and “p”) will have a larger region ofbackground shading than a line of text having only glyphs with nodescent (that is, glyphs such as “m”, “n”, and “o”). Defining the regionof background shading in this way means that changing a single glyph inthe first or last line of text in the shaded region may cause theboundaries of the shaded region to change. This may produce unexpectedchanges in the geometry of the shaded region, which are particularlyundesirable in applications where a digital publisher wishes to definethe shaded region precisely and reliably.

This effect is shown in FIG. 1A, which illustrates a left text column 10l having a shaded region 12 l, a center text column 10 c having a shadedregion 12 c, and a right text column 10 r having a shaded region 12 r.Each shaded region 12 l, 12 c, 12 r is defined by top and bottomboundaries that are positioned based on the shape of the glyphs presentin the first and last lines, respectively, of the text to which thebackground shading is applied. Because the first and last lines of textin each shaded region 12 l, 12 c, 12 r contain different glyphs, the topand bottom boundaries are positioned slightly differently in each textcolumn 10 l, 10 c, 10 r. For example, left text column 10 l and centertext column 10 c contain glyphs with relatively large ascents (“X” and“t”, respectively), while right text column 10 r does not. The topboundaries of shaded regions 12 l, 12 c are therefore higher than thetop boundary of shaded region 12 r. This is evident when the three topboundaries are compared to a top reference line 18 t that is uniformlydrawn across all three columns 10 l, 10 c, 10 r. In particular, anunshaded gap 16 a is visible between top reference line 18 t and shadedregion 12 r. Likewise, left text column 10 l contains a glyph with arelatively large descent (“q”), while center text column 10 c and righttext column 10 r do not. The bottom boundary of shaded region 12 l istherefore lower than the bottom boundaries of shaded regions 12 c, 12 r.This is evident when the three bottom boundaries are compared to abottom reference line 18 b that is uniformly drawn across all threecolumns 10 l, 10 c, 10 r. In particular, unshaded gaps 16 b, 16 c arevisible between bottom reference line 18 b and shaded regions 12 c, 12r, respectively. Unshaded gaps 16 a, 16 b, 16 c may intermittentlyappear, disappear, or change size depending on the particular glyphspresent in the first and last lines of text to which background shadingis applied. Unshaded gaps 16 a, 16 b, 16 c are generally considered tobe an unwanted visual distraction by many digital publishers.

Disclosed herein are various techniques for precisely and reliablypositioning top and bottom boundaries that define a region of backgroundshading that is applied to textual content. For example, in certainembodiments unshaded gaps 16 a, 16 b, 16 c are eliminated by positioningthe top and bottom boundaries of shaded regions 12 l, 12 c, 12 r basedon the shape of the glyphs that comprise the fonts present in eachshaded region 12 l, 12 c, 12 r. One implementation of this solution isillustrated in FIG. 1B. The top boundaries of shaded regions 12 l, 12 c,12 r are aligned with an ascent-based shading boundary 14 a which ispositioned based on the shapes of all of the glyphs that comprise thefonts present in each shaded region 12 l, 12 c, 12 r. More particularly,ascent-based shading boundary 14 a is positioned based on the glyph withthe largest ascent from amongst all the glyphs that comprise all thefonts within shaded regions 12 l, 12 c, 12 r. The bottom boundaries ofshaded regions 12 l, 12 c, 12 r are aligned with a baseline-basedshading boundary 14 b, which is positioned at the baseline of the lastline of text in each shaded region 12 t, 12 c, 12 r. This causes theshading in each text column 10 t, 10 c, 10 r to have identical top andbottom boundaries, thus eliminating unshaded gaps 16 a, 16 b, 16 c. Italso means that the top and bottom boundaries are unaffected by changesin the glyphs present in the first or last lines of shaded regions 12 t,12 c, 12 r. This allows the background shading to be applied preciselyand reliably, thus making it easier for digital publishers to achieve adesired background shading effect.

General Overview: Left and Right Boundaries

Desktop publishing applications can be understood as positioning text ina text frame having a size and position that can be manipulatedaccording to user preference. When background shading is applied to thetext within the text frame, existing desktop publishing applicationsposition the left and right boundaries of the shaded region such thatthey coincide with the left and right boundaries of the text frame.However, in many cases the left and right boundaries of the text do notactually coincide with the left and right boundaries of the text frame.For example, text can be aligned to the left, right, or center of thetext frame, or at an arbitrary position within the text frame. The textframe may have an internal margin. Because of factors such as these, agap may exist between the edge of the text and the edge of the textframe. If the background shading is applied to the text frame withoutregard to how text is positioned therein, this gap will be shaded, eventhough it contains no text. This effect is shown in FIG. 2, whichillustrates a text column having an upper paragraph 28 u to which framewidth background shading 24 has been applied. Frame width backgroundshading 24 extends to frame boundary 22, regardless of the fact that thetext does not. For a digital publisher who wishes to shade only textualcontent, the presence of this shaded region having no text will beundesirable. Existing desktop publishing applications therefore make itdifficult for a digital publisher to precisely position left and rightboundaries of a region of background shading.

Disclosed herein are various techniques for precisely and reliablypositioning right and left boundaries that define a region of backgroundshading that is applied to textual content. For example, in certainembodiments the aforementioned shaded region having no text iseliminated by positioning the left and right boundaries of the shadedregion along a text boundary 20 that corresponds to how the text isactually positioned within the text frame. This solution is also shownin FIG. 2. In particular, the text column illustrated in FIG. 2 includesa lower paragraph 28 l to which text width background shading 26 hasbeen applied. Text width background shading 26 extends only to textboundary 20, thus eliminating shading from the region that is betweentext boundary 20 and frame boundary 22, and that contains no text.Certain embodiments allow a digital publisher to choose whether to applyframe width background shading 24 or text width background shading 26 tospecified textual content. This allows the background shading to beapplied precisely and reliably, thus making it easier for the digitalpublisher to achieve a desired background shading effect.

General Overview: Applying Background Shading to CJK Characters

The aforementioned challenges associated with precisely controlling howbackground shading is applied to textual content may be exacerbated whentypesetting glyphs which are arranged in a frame grid as opposed toalong a baseline. Arranging glyphs in a frame grid results in each glyphbeing placed in a dedicated grid box, also referred to as an “embox”.Chinese, Japanese, and Korean (CJK) characters are often typeset in thisway, although other character sets associated with other languages maybe aligned in emboxes as well. Existing desktop publishing applicationsposition the boundaries of a region of background shading based on theshape of the glyphs that are present along the edges of the shadedregion. When applied to glyphs arranged in a frame grid, the backgroundshading therefore will not necessarily extend to the embox edges. Theresult is that the boundaries of the shaded region may vary depending onwhich glyphs are present along the edges of the shaded region. Changinga single glyph along an edge of the shaded region may cause theboundaries of the shaded region to shift. This may produce unexpectedchanges in the geometry of the shaded region, which are particularlyundesirable where a digital publisher wishes to define the shaded regionprecisely and reliably.

This effect is shown in FIG. 3A, which illustrates Japanese text withina shaded region 30 that is defined by boundaries that are based on theshape of the glyphs located along the edges of shaded region 30. Inparticular, the background shading does not extend past an embox glyphcoordination line 32 which corresponds to the furthest extent of theglyphs positioned along a given edge of the text. The result is anunshaded gap 36 located between the glyph edges and embox edges 34.Unshaded gap 36 may intermittently appear, disappear, or change sizedepending on the particular glyphs present along the edges of shadedregion 30. Its presence is generally considered to be an unwanted visualdistraction by many digital publishers.

Disclosed herein are various techniques for precisely and reliablypositioning boundaries that define a region of background shading thatis applied to characters, such as CJK characters, which are aligned inemboxes. For example, in certain embodiments unshaded gap 36 iseliminated by shading the entire embox associated with each glyph towhich background shading is to be applied. The boundaries of shadedregion 30 will thus coincide with embox edges 34, as illustrated in FIG.3B. This allows the background shading to be applied precisely andreliably, thus making it easier for digital publishers to achieve adesired background shading effect.

General Overview: Arbitrarily-Shaped Background Shading Regions

Existing desktop publishing applications are unable to conformbackground shading to an arbitrarily-shaped object that contains textualcontent. As a result, the background shading may overrun the containerobject. This effect is shown in FIG. 4A, which illustrates a shadedregion 42 that is positioned within a container object 40, whereinoverflow shading 44 extends outside container object 40. Preferably, thebackground shading would not extend outside container object 40, asillustrated in FIG. 4B. Disclosed herein are various techniques forprecisely and reliably applying background shading to anarbitrarily-shaped object that contains textual content. For example, incertain embodiments a clipping path is applied to shaded region 42,wherein the clipping path is defined by the geometry of container object40. This allows the shaded region 42 to conform to an arbitrarily-shapedcontainer object 40, thus providing digital publishers with greaterversatility in applying background shading, and making it easier forthem to achieve a desired background shading effect.

General Overview: Definitions

While the various techniques disclosed herein are often described asbeing used by a digital publisher using a desktop publishing applicationto manipulate a digital publication, it will be appreciated that suchtechniques may be implemented using a wide variety of softwareapplications including word processors, spreadsheet applications,presentation applications, photo editors, electronic mail clients, andany other software capable of manipulating digital content. It will alsobe appreciated that such techniques can be used by not only digitalpublishers, but indeed by any other user seeking to more precisely andreliability define how background shading is to be applied to textualcontent.

As used herein the term “glyph” refers, in addition to its ordinarymeaning, to a typographical element that can be understood as includingone or more characters. Thus a paragraph can be understood as includinga plurality of glyphs arranged in one or more lines. More generally,textual content can be understood as including a plurality of glyphs,and therefore the terms “textual content” and “plurality of glyphs” maybe used interchangeably herein. In many cases, a one-to-onecorrespondence exists between glyphs and characters, such as in the caseof the character “a” being represented by the glyph “a”. However in somecases a combination of multiple characters can be represented by asingle glyph. For instance, the characters “o” and “e” can be combinedand represented by the single glyph “

”. Similarly, the characters “f” and “l” can be combined and representedby glyphs such as “ffl” or “fl”. As yet another example, the Arabiccharacters “

” and “

” can be combined and represented by the single glyph “

”. The term “ligature” refers to the action of binding two characterstogether to form a glyph, and therefore the terms “glyph” and “ligature”are often used interchangeably when referring to glyphs that correspondto multiple characters. Although ligatures are used in a wide range oflanguages, they are particularly common in Arabic.

As used herein the term “font resource” refers, in addition to itsordinary meaning, to information that defines a particular font withsufficient specificity such that the font may be rendered usingappropriate software. Such software may include, for example, anoperating system, an application such as a word processor or a desktoppublishing application, or a device driver that is capable ofcontrolling hardware. A font resource may define a set of glyphs,characters, or symbols using a matrix of dots (in the case of bitmapfonts) or a collection of lines and/or curves (in the case of outlineand stroke fonts). The digital information that comprises a fontresource can be organized and stored according to a variety of differentstandards, such as the Glyph Bitmap Distribution Format (BDF) for bitmapfonts, the PostScript (PS) format for outline fonts, or the Metafontdescription language for stroke fonts. Other proprietary or open sourceformats can be used in other embodiments, and thus it will beappreciated that the various embodiments disclosed herein are notlimited to use of font resource data that is stored in any particularformat.

As used herein, the term “background shading” refers, in addition to itsordinary meaning, to a field that is applied behind a foregroundelement. For example, in certain of the embodiments disclosed hereinbackground shading is applied behind textual content or a framecontaining textual content. Background shading may also be appliedbehind non-textual elements. The field used in background shading maycomprise a solid color field, a color field having a gradient, apattern, or any other suitable appearance. Where background shadingcomprises a color field, virtually any color can be used, includingblack, white, and transparent. Background shading may have a degree oftransparency, such that additional elements or graphical featureslocated behind the background shading field, such as a watermark, may beat least partially visible. Background shading can be represented bymetadata in a wide range of digital formats, including the electronicpublication (EPUB) format and hypertext markup language (HTML). Thevarious techniques for applying background shading that are disclosedherein can be applied to background shading generally, and thus are notintended to be limited to any particular type of background shading.

System Architecture

FIG. 5 is a block diagram schematically illustrating selected componentsof an example computer system 100 that can be used to positionboundaries that define a region of background shading that is applied todigitally published text. Computer system 100 may comprise, for example,one or more devices selected form a desktop computer, a laptop computer,a workstation, a tablet computer, a smartphone, a handheld computer, aset-top box, an enterprise class server, or any other such computingderive. A combination of different devices may be used in certainembodiments. In the illustrated embodiment, computer system 100includes, among other things, a processor 110, a memory 120, anoperating system 140, a communication module 150, and a desktoppublishing application 160. As can be further seen a bus and/orinterconnect 170 is also provided to allow for inter- and intra-devicecommunications using, for example, communication module 150.

Depending on the particular type of device used for implementation,computer system 100 is optionally coupled to or otherwise implemented inconjunction with, one or more peripheral hardware components 180.Examples of peripheral hardware components 180 include a display 182, atextual input device 184 (such as a keyboard), a pointer-based inputdevice 186 (such as a mouse), and a printer 188 (or other outputdevice). One or more other input/output devices, such as a touchsensitive display, a speaker, a scanner, a printer capable of generatinga three-dimensional object (often colloquially referred to as a “3Dprinter”), or a microphone, can be used in other embodiments. Forexample, in a particular alternative embodiment wherein computer system100 is implemented in the form of a tablet computer, certainfunctionality associated with the particular peripheral hardwarecomponents 180 illustrated in FIG. 5 is provided instead by a touchsensitive display and a camera that forms part of the tablet computer.In general, computer system 100 may be coupled to a network 300 to allowfor communications with other computing devices or resources, such asremotely-provisioned digital publishing services 400 and/or a networkedstorage repository 500. Other components and functionality not reflectedin the schematic block diagram of FIG. 5 will be apparent in light ofthis disclosure and thus it will be appreciated that other embodimentsare not limited to any particular hardware configuration.

Processor 110 can be any suitable processor, and may include one or morecoprocessors or controllers, such as an audio processor or a graphicsprocessing unit, to assist in processing operations of computer system100. Memory 120 can be implemented using any suitable type of digitalstorage, such as one or more of a disk drive, a universal serial busdrive, flash memory, and random access memory. Memory 120 can be used tostore font resources 122 that define the various fonts used by softwaresuch as desktop publishing application 160, although font resources 122may additionally or alternatively be stored in networked storagerepository 500. Operating system 140 may comprise any suitable operatingsystem, such as Google Android (Google Inc., Mountain View, Calif.),Microsoft Windows (Microsoft Corp., Redmond, Wash.), Apple iOS (AppleInc., Cupertino, Calif.), or Apple OS X (Apple Inc., Cupertino Calif.).As will be appreciated in light of this disclosure, the techniquesprovided herein can be implemented without regard to the particularoperating system provided in conjunction with computer system 100, andtherefore may also be implemented using any suitable existing orsubsequently developed platform. Communication module 150 can be anyappropriate network chip or chipset which allows for wired and/orwireless communication via network 300 to external resources such asdigital publishing services 400 and networked storage repository 500.Bus and/or interconnect 170 may also be provided to allow for inter- andintra-device communications using, for example, communication module150.

Desktop publishing application 160 comprises any suitable computersoftware application that enables users to create and manipulate a widerange of digital content, including digital publications, textualdocuments, graphical layouts, and the like. To this end, desktoppublishing application 160 includes a wide range of functionality thatallows visual aspects of both graphical and textual content to bemanipulated. Particularly with respect to textual content, desktoppublishing application 160 includes typography tools that allowbackground shading to be applied to textual content, as will bedescribed in turn. Desktop publishing application 160 is capable ofmanipulating digital content that is stored both locally (for example,in memory 120) as well as remotely (for example, in networked storagerepository 500). Examples of commercially available desktop publishingapplications include Adobe® InDesign° (Adobe Systems Incorporated, SanJose, Calif.) and Microsoft® Publisher (Microsoft Corporation, Redmond,Wash.).

In certain embodiments desktop publishing application 160 is installedlocal to computer system 100, as illustrated in the example embodimentof FIG. 5. However, in alternative embodiments computer system 100 isimplemented in a client-server computing environment wherein at least aportion of desktop publishing application 160 is provided to computersystem 100 using an applet, such as a JavaScript applet, or otherdownloadable module. Such a remotely-provisioned module can be providedin real-time in response to a request from computer system 100 foraccess to a server having resources that are of interest to a user ofcomputer system 100, such as remotely-provisioned digital publishingservices 400. The server, if applicable, may be local to network 300 ormay be remotely coupled to network 300 by one or more other networks orcommunication channels. In any such standalone or networked computingscenarios, desktop publishing application 160 can be implemented withany suitable combination of technologies that allow a user to create andmanipulate digital publications.

Still referring to the example embodiment illustrated in FIG. 5, desktoppublishing application 160 includes a user interface sub-module 162.User interface sub-module 162 comprises instructions encoded on acomputer readable medium that, when executed using a processor, cause auser interface to be generated. The user interface is configured toreceive user input that defines how background shading is to be appliedto textual content. To this end, the user interface generated by userinterface sub-module 162 may include elements such as menu bars,toolbars, dialog boxes, control panels, dropdown menus, context menus,checkboxes, radio buttons, and the like.

FIG. 6 illustrates an example user interface 60 that can be used todefine how background shading is applied to digitally published text.User interface 60 includes a top edge position control 62 that allows auser to select a particular basis for positioning the top boundary of aregion of background shading, and a bottom edge position control 64 thatallows a user to select a particular basis for positioning the bottomboundary of a region of background shading. Similarly, user interface 60also includes a width control 66 that allows a user to select aparticular basis for positioning the left and right boundaries of aregion of background shading. The various bases for positioning the top,bottom, left, and right boundaries of the shaded region will bedescribed in turn. In some implementations, one or more of top edgeposition control 62, bottom edge position control 64, and width control66 include a user interface element that allows a numerical position tobe input, thus providing even further control over the exact position ofthe boundaries of the shaded region. In certain embodiments userinterface 60 also includes a clipping control 68 that allows a user tospecify whether the region of background shading should be clipped tothe shape of a text container object. The various user interfacecontrols illustrated in FIG. 6 are exemplary, and thus other embodimentsmay have fewer, additional, or alternative controls.

The user interface generated by user interface sub-module 162 is alsooptionally configured to receive user input that characterizes thebackground shading itself, for example in terms of visual attributessuch as color, gradient, transparency, pattern, and so forth. In certainembodiments the user interface is also capable of receiving a textselection that defines the particular textual content to which thebackground shading is to be applied. And in addition to receiving thevarious inputs described herein, the user interface can also be used todisplay digital content, and in particular, digital content to whichbackground shading has been applied. User interface therefore allows auser to simultaneously define and visualize background shading.

In certain embodiments desktop publishing application 160 furtherincludes a boundary positioning sub-module 164. Boundary positioningsub-module 164 comprises instructions encoded on a computer readablemedium that, when executed using a processor, cause a boundarypositioning process to be invoked. The boundaries, which define a regionof background shading, can be positioned based on a number of factors.For example, in one embodiment the boundaries are positioned based onthe shape of the glyphs that comprise the fonts present in theidentified textual content to which background shading is to be applied.Boundary positioning sub-module 164 is therefore capable of leveragingfont resources 122 stored in memory 120 to evaluate the various glyphsthat comprise a detected font. In some implementations the boundariesare positioned based on a user-specified boundary, such as abaseline-based shading boundary. Boundary positioning sub-module 164 istherefore also capable of leveraging user preferences received via, forexample, a user interface generated by user interface sub-module 162.Furthermore, in applications where background shading is to be appliedto glyphs which are arranged in a frame grid, as is often the case forCJK typesetting, the boundaries may be positioned in accordance with theedges of the emboxes that contain the glyphs to which background shadingis to be applied.

Desktop publishing application 160 also optionally includes a boundaryclipping sub-module 166. Boundary clipping sub-module 166 comprisesinstructions encoded on a computer readable medium that, when executedusing a processor, cause a boundary clipping process to be invoked. Theboundary clipping process can be used to conform background shading toan arbitrarily-shaped container object that contains textual content. Incertain embodiments this is accomplished by applying a clipping path tothe region that is defined by boundary positioning sub-module 164. Insuch embodiments the clipping path is defined by the geometry of thearbitrarily-shaped container object.

As noted above, desktop publishing application 160 includes typographytools that allow background shading to be applied to textual content. Tothis end, in one embodiment desktop publishing application 160 includesa text shading sub-module 168 that comprises instructions encoded on acomputer readable medium that, when executed using a processor, cause abackground shading process to be invoked. In one implementation, thebackground shading process causes background shading to be applied tothe region defined by the aforementioned boundary positioning process,as optionally modified by the aforementioned boundary clipping process.Once the background shading is applied in accordance with the foregoing,the textual content with its underlying background shading can bedisplayed via the user interface generated by user interface sub-module162.

Computer system 100 can communicate with the various networked resourcesdescribed herein via network 300. Network 300 may be a local areanetwork (such as a home-based or office network), a wide area network(such as the Internet), a peer-to-peer network (such as a Bluetoothconnection), or a combination of such networks, whether public, private,or both. For example, in certain embodiments at least a portion of thefunctionality associated with network 300 is provided by a cellular datanetwork, thereby making it easier for users of smartphones and tabletcomputers to leverage networked resources. In general, communicationsamongst the various entities and resources described herein may occurvia wired and/or wireless connections, such as may be provided by Wi-Fior mobile data networks. In some cases access to resources on a givennetwork or computing system may require credentials such as a usernameand password, and/or may require compliance with any other suitablesecurity mechanism.

The embodiments described herein can be implemented in various forms ofhardware, software, firmware, and/or special purpose processors. Forexample, in one embodiment a non-transitory computer readable medium hasinstructions encoded thereon that, when executed by one or moreprocessors, cause one or more of the background shading applicationmethodologies described herein to be implemented. The instructions canbe encoded using any suitable programming language, such as C, C++,object-oriented C, JavaScript, Visual Basic .NET, BASIC, oralternatively, using custom or proprietary instruction sets. Suchinstructions can be provided in the form of one or more computersoftware applications and/or applets that are tangibly embodied on amemory device, and that can be executed by a computer having anysuitable architecture. In one embodiment the system can be hosted on agiven website and implemented, for example, using JavaScript or anothersuitable browser-based technology.

The functionalities disclosed herein can optionally be incorporated intoa variety of different software applications, such as desktop publishingapplications, word processing applications, image editing softwareapplications, and presentation applications. For example, an imageediting application can be configured to apply background shading totext within a graphical object that forms part of a graphical image. Theimage processing application can therefore be configured to implementcertain of the functionalities disclosed herein so as to allow suchbackground shading to be applied to the text consistently and precisely.The computer software applications described herein may include a numberof different modules, sub-modules, or other components of distinctfunctionality, and can provide information to, or receive informationfrom, still other components and services. These modules can be used,for example, to communicate with peripheral hardware components 180,networked storage resources such as networked storage repository 500, orother external components. More generally, other components andfunctionality not reflected in the illustrations will be apparent inlight of this disclosure, and it will be appreciated that the presentdisclosure is not intended to be limited to any particular hardware orsoftware configuration. Thus in other embodiments the componentsillustrated in FIG. 5 may include additional, fewer, or alternativesubcomponents.

The aforementioned non-transitory computer readable medium may be anysuitable medium for storing digital information, such as a hard drive, aserver, a flash memory, and/or random access memory. In alternativeembodiments, the computers and/or modules disclosed herein can beimplemented with hardware, including gate level logic such as afield-programmable gate array (FPGA), or alternatively, a purpose-builtsemiconductor such as an application-specific integrated circuit (ASIC).Still other embodiments may be implemented with a microcontroller havinga number of input/output ports for receiving and outputting data, and anumber of embedded routines for carrying out the various functionalitiesdisclosed herein. It will be apparent that any suitable combination ofhardware, software, and/or firmware can be used, and that the presentdisclosure is not intended to be limited to any particular systemarchitecture.

Methodology: General Overview

FIG. 7 is a flowchart illustrating an example method 2000 forpositioning boundaries that define a region of background shading thatis applied to digitally published text, and then applying backgroundshading to the defined region. As can be seen, method 2000 includes anumber of phases and sub-processes, the sequence of which may vary fromone embodiment to another. However, when considered in the aggregate,these phases and sub-processes form part of an improved digitalpublishing framework that is capable of precisely and reliably applyingbackground shading to textual content. The techniques disclosed hereinare responsive to user input in accordance with certain of theembodiments disclosed herein. Method 2000 can be implemented, forexample, using the system architecture illustrated in FIG. 5 anddescribed herein. However, other system architectures can be used inother embodiments, as will be apparent in light of this disclosure. Tothis end, the correlation of the various functionalities shown in FIG. 7to the specific components illustrated in FIG. 5 is not intended toimply any structural and/or use limitations. Rather other embodimentsmay include, for example, varying degrees of integration whereinmultiple functionalities are effectively performed by one system ormodule. For example, in an alternative embodiment a single module can beused to apply background shading to a defined region and display textover the applied background shading. Thus other embodiments may havefewer or more modules depending on the granularity of implementation.Numerous variations and alternative configurations will be apparent inlight of this disclosure.

As illustrated in FIG. 7, method 2000 commences with identifying aplurality of glyphs to which background shading should be applied. Seereference numeral 2100 in FIG. 7. The plurality of glyphs can beidentified via the user interface generated by user interface sub-module162. For example, in one embodiment a user highlights the text to whichbackground shading is to be applied using pointer-based input device186. Other text selection techniques can be used in other embodiments.Once the plurality of glyphs have been identified, the boundarypositioning process invoked by boundary positioning sub-module 164positions top and bottom boundaries of the region of background shading.See reference numeral 2200 in FIG. 7. One way of accomplishing this isillustrated in FIGS. 8A and 8B, which will be described in turn. Theboundary positioning process invoked by boundary positioning sub-module164 also positions left and right boundaries of the region of backgroundshading. See reference numeral 2300 in FIG. 7. One way of accomplishingthis is illustrated in FIG. 9, which will also be described in turn. Incertain embodiments the boundary positioning process is responsive touser input received via one or more of top edge position control 62,bottom edge position control 64, and width control 66 in the exampleuser interface 60 that is illustrated in FIG. 6.

Once the top, bottom, left, and right boundaries have been positioned,the boundary clipping process invoked by boundary clipping sub-module166 determines whether the boundaries of the region to which backgroundshading is to be applied should be clipped to a surrounding containerobject, if any. See reference numeral 2400 in FIG. 7. In someimplementations, this determination may be based on user input receivedvia clipping control 68 in the example user interface 60 that isillustrated in FIG. 6. In other implementations, this determination maybe based on an evaluation of whether any container object is present. Ifthe boundaries should be clipped, the boundary clipping process invokedby boundary clipping sub-module 166 applies a clipping path to theregion defined by boundary positioning sub-module 164. The clippingpath, which may be defined by the geometry of an arbitrarily-shapedcontainer object, can be applied on a graphics port which is used torender the background shading. See reference numeral 2450 in FIG. 7.This allows background shading to be applied to a plurality of glyphsthat are contained within non-rectangular objects, and in particular,that are contained within any arbitrarily-shaped container object.

Once the region of background shading has been appropriately modified toconform to a container object, if any, the background shading processinvoked by text shading sub-module 168 applies background shading to theregion defined by the boundary positioning process. See referencenumeral 2500 in FIG. 7. This can be accomplished by drawing thebackground shading color, pattern, or other visual characteristic on theaforementioned graphics port. Applying background shading optionallyincludes updating metadata that characterizes the digital content whichincludes the applied background shading. The previously identifiedplurality of glyphs and the background shading can then be displayedusing the user interface generated by user interface sub-module 162. Seereference numeral 2600 in FIG. 7. This allows a user to simultaneouslydefine and visualize background shading.

Methodology: Positioning Top and Bottom Boundaries

FIGS. 8A and 8B comprise a flowchart illustrating an example method 2200for positioning top and bottom boundaries of a region of backgroundshading that is to be applied to digitally published text. The verticalspan of the shaded region can be understood as the difference betweenthe top and bottom edges of the shaded region. Method 2200 commenceswith obtaining a user selection that defines the position of the topboundary of the region to which background shading is to be applied. Seereference numeral 2210 in FIG. 8A. In certain embodiments this userselection is provided via top edge position control 62 of example userinterface 60. As illustrated in FIG. 6, a number of rules exist fordefining the top boundary position. In some cases the top boundaryposition can be set manually, for example by the user specifying aposition numerically or graphically. Examples of rules for defining thetop boundary position include, but are not limited to:

-   -   a. Embox Top: Where background shading is to be applied to        glyphs which are arranged in a frame grid, as is often the case        for CJK typesetting, the top boundary of the shaded region may        be positioned at the top edge of the first row of emboxes in the        frame grid. See reference numeral 2211 in FIG. 8A. Background        shading is thus applied to the entire area of each embox in the        first row of the previously identified text. The top boundary of        the shaded region is unaffected by the geometry of the        particular glyphs present in the first row of emboxes. The        result is a more stable and precise positioning of the top        boundary of the shaded region. An example of such background        shading is illustrated in FIG. 3B, where shaded region 30        uniformly extends to embox edges 34. Positioning the top        boundary of the shaded region in this way can be achieved by        selecting “Embox Top” in top edge position control 62 of user        interface 60, as illustrated in FIG. 6.    -   b. Embox Center: Where background shading is to be applied to        glyphs which are arranged in a frame grid, as is often the case        for CJK typesetting, the top boundary of the shaded region may        be positioned along a centerline of the first row of emboxes in        the frame grid. See reference numeral 2212 in FIG. 8A.        Background shading is thus applied to half of each embox in the        first row of the previously identified text. The top boundary of        the shaded region is unaffected by the geometry of the        particular glyphs present in the first row of emboxes. The        result is a more stable and precise positioning of the top        boundary of the shaded region. An example of such background        shading is illustrated in FIG. 3C, wherein shaded region 30        extends only to an embox centerline 34 c associated with the        first row of emboxes in the frame grid. Positioning the top        boundary of the shaded region in this way can be achieved by        selecting “Embox Center” in top edge position control 62 of user        interface 60, as illustrated in FIG. 6. While one embodiment        provides for positioning of the top boundary at embox centerline        34 c, the top boundary may be positioned elsewhere with respect        to a row of emboxes, including, for example, at a user-defined        position with respect to the row of emboxes.    -   c. Baseline: The top boundary of the shaded region may be        positioned along the baseline of the first line of identified        text. See reference numeral 2214 in FIG. 8A. In this case, the        top boundary of the shaded region is unaffected by the geometry        of the particular glyphs present in the first line of identified        text. The result is a more stable and precise positioning of the        top boundary of the shaded region. An example of a        baseline-based shading boundary 14 b is illustrated in FIG. 1B,        wherein boundary 14 b extends uniformly across each column 10 t,        10 c, 10 r. Positioning the top boundary of the shaded region in        this way can be achieved by selecting “Baseline” in top edge        position control 62 of user interface 60, as illustrated in FIG.        6.    -   d. Leading: The top boundary of the shaded region may be        positioned one baseline increment above the identified text. See        reference numeral 2215 in FIG. 8A. In this case, the top        boundary of the shaded region is unaffected by the geometry of        the particular glyphs present in the first line of identified        text. The result is a more stable and precise positioning of the        top boundary of the shaded region. An example of a leading-based        shading boundary 14 t is illustrated in FIG. 1B, wherein        boundary 14 t extends uniformly across each column 10 t, 10 c,        10 r. Positioning the top boundary of the shaded region in this        way can be achieved by selecting “Leading” in top edge position        control 62 of user interface 60, as illustrated in FIG. 6.    -   e. Ascent: The top boundary of the shaded region may be        positioned based on the largest ascent of all of the glyphs that        comprise the fonts present in the identified text. More        specifically, the top boundary can be positioned at a distance        above the baseline of the first line of identified text, wherein        the distance is substantially equal to the aforementioned        largest ascent. As used herein, “substantially equal” refers to        an equivalence that gives a consumer of the identified text the        impression that the background shading would fully encompass all        glyphs that comprise the fonts present in the identified text.        Positioning the top boundary of the shaded region in this way        can be accomplished by first identifying the fonts present in        the identified text. See reference numeral 2216 a in FIG. 8A.        Each of the fonts present in the identified text defines a        plurality of glyphs. The maximum ascent of the plurality of        glyphs comprising the identified fonts is then determined. See        reference numeral 2216 b in FIG. 8A. Such a determination can be        made with reference to font resources 122 stored in memory 120.        The top boundary of the shaded region, also referred to as an        ascent-based shading boundary, can then be positioned at the        determined maximum ascent. See reference numeral 2216 c in FIG.        8A. Thus, even if the identified text is later manipulated such        that different glyphs are present in the first line, the top        boundary of the shaded region will be unaffected by such        manipulations. The result is a more stable and precise        positioning of the top boundary of the shaded region. An example        of ascent-based shading boundary 14 a is illustrated in FIG. 1B,        wherein boundary 14 a extends uniformly across each column 10 t,        10 c, 10 r. Positioning the top boundary of the shaded region in        this way can be achieved by selecting “Ascent” in top edge        position control 62 of user interface 60, as illustrated in FIG.        6.

Method 2200 also comprises obtaining a user selection that defines theposition of the bottom boundary of the region to which backgroundshading is to be applied. See reference numeral 2220 in FIG. 8B. Whileexample method 2200 is described herein as defining the position of thetop boundary before that of the bottom boundary, in alternativeimplementations the position of the bottom boundary is defined first. Incertain embodiments the user selection that defines the position of thebottom boundary is provided via bottom edge position control 64 ofexample user interface 60. As illustrated in FIG. 6, a number of rulesexist for defining the bottom boundary position. In some cases thebottom boundary position can be set manually, for example by the userspecifying a position numerically or graphically. Examples of rules fordefining the bottom boundary position include, but are not limited to:

-   -   a. Embox Bottom: Where background shading is to be applied to        glyphs which are arranged in a frame grid, as is often the case        for CJK typesetting, the bottom boundary of the shaded region        may be positioned at the bottom edge of the last row of emboxes        in the frame grid. See reference numeral 2221 in FIG. 8B.        Background shading is thus applied to the entire area of each        embox in the last row of identified text. The bottom boundary of        the shaded region is unaffected by the geometry of the        particular glyphs present in the last row of emboxes. The result        is a more stable and precise positioning of the bottom boundary        of the shaded region. An example of such background shading is        illustrated in FIG. 3B, where shaded region 30 uniformly extends        to embox edges 34. Positioning the bottom boundary of the shaded        region in this way can be achieved by selecting “Embox Bottom”        in bottom edge position control 64 of user interface 60, as        illustrated in FIG. 6.    -   b. Embox Center: Where background shading is to be applied to        glyphs which are arranged in a frame grid, as is often the case        for CJK typesetting, the bottom boundary of the shaded region        may be positioned along a centerline of the last row of emboxes        in the frame grid. See reference numeral 2222 in FIG. 8B.        Background shading is thus applied to half of each embox in the        last row of the previously identified text. The bottom boundary        of the shaded region is unaffected by the geometry of the        particular glyphs present in the last row of emboxes. The result        is a more stable and precise positioning of the bottom boundary        of the shaded region. Positioning the bottom boundary of the        shaded region in this way can be achieved by selecting “Embox        Center” in bottom edge position control 64 of user interface 60,        as illustrated in FIG. 6. While one embodiment provides for        positioning of the bottom boundary at an embox centerline, the        bottom boundary may be positioned elsewhere with respect to a        row of emboxes, including, for example, at a user-defined        position with respect to the row of emboxes.    -   c. Baseline: The bottom boundary of the shaded region may be        positioned along the baseline of the last line of identified        text. See reference numeral 2224 in FIG. 8B. In this case, the        bottom boundary of the shaded region is unaffected by the        geometry of the particular glyphs present in the last line of        identified text. The result is a more stable and precise        positioning of the bottom boundary of the shaded region. An        example of a baseline-based shading boundary is illustrated in        FIG. 1B, wherein boundary 14 b extends uniformly across each        column 10 t, 10 c, 10 r. Positioning the bottom boundary of the        shaded region in this way can be achieved by selecting        “Baseline” in bottom edge position control 64 of user interface        60, as illustrated in FIG. 6.    -   d. Descent: The bottom boundary of the shaded region may be        positioned based on the largest descent of all of the glyphs        that comprise the fonts present in the identified text. More        specifically, the bottom boundary can be positioned at a        distance below the baseline of the last line of identified text,        wherein the distance is substantially equal to the        aforementioned largest descent. As used herein, “substantially        equal” refers to an equivalence that gives a consumer of the        identified text the impression that the background shading would        fully encompass all glyphs that comprise the fonts present in        the identified text. Positioning the bottom boundary of the        shaded region in this way can be accomplished by first        identifying the fonts present in the identified text. See        reference numeral 2226 a in FIG. 8B. Each of the fonts present        in the identified text defines a plurality of glyphs. The        maximum descent of the plurality of glyphs comprising the        identified fonts is then determined. See reference numeral 2226        b in FIG. 8B. Such a determination can be made with reference to        font resources 122 stored in memory 120. The bottom boundary of        the shaded region, also referred to as a descent-based shading        boundary, can then be positioned at the determined maximum        descent. See reference numeral 2226 c in FIG. 8B. Thus, even if        the identified text is later manipulated such that different        glyphs are present in the last line, the bottom boundary of the        shaded region will be unaffected by such manipulations. The        result is a more stable and precise positioning of the bottom        boundary of the shaded region. An example of a descent-based        shading boundary 14 d is illustrated in FIG. 1B, wherein        boundary 14 d extends uniformly across each column 10 l, 10 c,        10 r. Positioning the bottom boundary of the shaded region in        this way can be achieved by selecting “Descent” in bottom edge        position control 64 of user interface 60, as illustrated in FIG.        6.

The example methods disclosed herein for positioning the top and bottomboundaries of a region of background shading can be applied in automatedworkflows. For example, baseline settings or fixed position settings canbe scripted and applied as fixed offsets based on font attributes. Fixedposition settings can be defined as a numerically-provided offsetrelative to a page edge, a margin, a column, a baseline, or some otherlayout feature. In embodiments wherein baseline settings or fixedposition settings are scripted, user interface 60 and user interfacesub-module 162 are optionally omitted.

Methodology: Positioning Left and Right Boundaries

FIG. 9 is a flowchart illustrating an example method 2300 forpositioning left and right boundaries of a region of background shadingthat is to be applied to digitally published text. The horizontal spanof the shaded region can be understood as the difference between theleft and right edges of the shaded region. Method 2300 commences withobtaining a user selection that defines the width of the region to whichbackground shading is to be applied. See reference numeral 2310 in FIG.9. In certain embodiments the user selection is provided via widthcontrol 66 of example user interface 60. As illustrated in FIG. 6, anumber of rules exist for defining the position of the left and rightboundaries of the shaded region. In some cases the left and rightboundary positions can be set manually, for example by the userspecifying a position numerically or graphically. Examples of rules fordefining the left and right boundary positions include, but are notlimited to:

-   -   a. Column: Where the user specifies that the width of the shaded        region should correspond to the width of the column containing        the identified text, the left and right column boundaries for        each line of identified text are determined. See reference        numeral 2311 in FIG. 9. The left boundary of the shaded region        is positioned at the leftmost column boundary. See reference        numeral 2312 in FIG. 9. Likewise, the right boundary of the        shaded region is positioned at the rightmost column boundary.        See reference numeral 2314 in FIG. 9. An example of textual        content having background shading that is applied in this way is        illustrated in FIG. 2. In particular, FIG. 2 illustrates frame        width background shading 24 that extends to frame boundary 22,        regardless of the fact that the textual content within the frame        does not. Positioning the left and right boundaries of the        shaded region in this way can be achieved by selecting “Column”        in width control 66 of user interface 60, as illustrated in FIG.        6.    -   b. Text: Where the user specifies that the width of the shaded        region should correspond to the width of the identified text        itself, the leftmost and rightmost points in each line of        identified text are determined. See reference numeral 2315 in        FIG. 9. The left boundary of the shaded region is positioned at        the leftmost point for all lines of identified text. See        reference numeral 2316 in FIG. 9. Likewise, the right boundary        of the shaded region is positioned at the rightmost point for        all lines of identified text. See reference numeral 2317 in        FIG. 9. An example of textual content having background shading        that is applied in this way is illustrated in FIG. 2. In        particular, FIG. 2 illustrates text width background shading 26        that extends only to left and right text boundaries 20,        regardless of the location of frame boundaries 22. This provides        digital publishers with a greater degree of control over how        background shading is applied to identified text, and in        particular, helps avoid shading margin regions that do not        contain any textual content. Positioning the left and right        boundaries of the shaded region in this way can be achieved by        selecting “Text” in width control 66 of user interface 60, as        illustrated in FIG. 6.

The example methods disclosed herein for positioning the left and rightboundaries of a region of background shading can be applied in automatedworkflows. For example, width control settings or fixed positionsettings can be scripted and applied as fixed offsets based on userpreference. Fixed position settings can be defined as anumerically-provided offset relative to a page edge, a margin, a column,a baseline, or some other layout feature. In embodiments wherein widthcontrol settings or fixed position settings are scripted, user interface60 and user interface sub-module 162 are optionally omitted.

Further Example Embodiments

Numerous variations and configurations will be apparent in light of thisdisclosure. For instance, as illustrated in FIG. 10, one exampleembodiment provides a computer-implemented method 3000 for applyingbackground shading to textual content. The method includes receivinguser input that defines a textual content segment that is to be locatedwithin a region of background shading. The textual content segmentincludes a first plurality of glyphs arranged in one or more lines. Seereference numeral 3100 in FIG. 10. See also reference numeral 2100 inFIG. 7, which indicates that method 2000 for positioning the boundariesthat define a region of background shading includes identifying a firstplurality of glyphs to which background shading should be applied.

Method 3000 further includes identifying a font associated with thefirst plurality of glyphs. The identified font includes a secondplurality of glyphs. See reference numeral 3200 in FIG. 10. See alsoreference numerals 2216 a in FIG. 8A and 2226 a in FIG. 8B, whichindicate that method 2200 for positioning top and bottom boundaries of aregion of background shading includes identifying fonts present in theidentified text. Thus, in such embodiments the first plurality of glyphsincludes the text selected to which background shading is to be applied,and the second plurality of glyphs includes the glyphs that collectivelyinclude one of the identified fonts.

Method 3000 further includes determining a maximum dimension associatedwith the second plurality of glyphs. See reference numeral 3300 in FIG.10. See also reference numeral 2216 b in FIG. 8A, which indicates thatmethod 2200 for positioning top and bottom boundaries of a region ofbackground shading includes determining a maximum ascent of theplurality of glyphs comprising the identified fonts, that is, the secondplurality of glyphs. Likewise, reference numeral 2226 b in FIG. 8Bindicates that method 2200 includes determining a maximum descent of thesecond plurality of glyphs.

Method 3000 further includes positioning a boundary of the region ofbackground shading at a distance from a baseline of a particular one ofthe lines. The distance is based on the determined maximum dimension.See reference numeral 3400 in FIG. 10. See also reference numeral 2216 cin FIG. 8A, which indicates that method 2200 for positioning top andbottom boundaries of a region of background shading includes positioninga top boundary at a determined maximum ascent. Ascent-based shadingboundary 14 a illustrated in FIG. 1B is an example of a top boundarypositioned in this way. See also reference numeral 2226 c in FIG. 8B,which indicates that method 2200 includes positioning a bottom boundaryat a determined maximum descent. Descent-based shading boundary 14 dillustrated in FIG. 1B is an example of a bottom boundary positioned inthis way.

Method 3000 further includes displaying background shading in the regionof background shading. See reference numeral 3500 in FIG. 10. See alsoreference numerals 2500 and 2600 in FIG. 7, which indicate that method2000 for positioning the boundaries that define a region of backgroundshading includes applying background shading to a region defined by suchboundaries, and displaying the plurality of glyphs with the backgroundshading. Shaded regions 12 l, 12 c, 12 r illustrated in FIG. 1B areexamples of a region wherein a plurality of glyphs displayed withbackground shading, and wherein the region of background shading is atleast partially defined by an ascent-based shading boundary.

In some cases (a) the textual content segment forms part of a digitalpublication; and (b) determining the maximum dimension associated withthe second plurality of glyphs further includes accessing a fontresource that does not form part of the digital publication. In somecases the method further includes (a) defining a clipping path thatcorresponds to a shape of a container object, wherein the textualcontent segment is positioned within the container object; and (b)applying the clipping path to a graphics port, wherein displaying thebackground shading includes drawing the background shading on thegraphics port to which the clipping path has been applied. In some caseseach glyph in the first plurality of glyphs is also included in thesecond plurality of glyphs. In some cases displaying the backgroundshading further includes displaying the textual content segment over thebackground shading. In some cases (a) the determined maximum dimensionis a maximum ascent associated with the second plurality of glyphs; (b)positioning the boundary further includes positioning a top boundary ofthe region of background shading at the distance above the baseline of afirst line of the textual content segment; and (c) the distance issubstantially equal to the maximum ascent. In some cases (a) thedetermined maximum dimension is a maximum descent associated with thesecond plurality of glyphs; (b) positioning the boundary furtherincludes positioning a bottom boundary of the region of backgroundshading at the distance below the baseline of a last line of the textualcontent segment; and (c) the distance is substantially equal to themaximum descent. In some cases (a) determining the maximum dimensionfurther includes determining a maximum ascent and a maximum descentassociated with the second plurality of glyphs; (b) positioning theboundary further includes (i) positioning a top boundary at a distanceabove a baseline of a first line of the textual content segment, and(ii) positioning a bottom boundary at a distance below a baseline of alast line of the textual content segment; (c) the distance above thebaseline of the first line of the textual content segment issubstantially equal to the maximum ascent; and (d) the distance belowthe baseline of the last line of the textual content segment issubstantially equal to the maximum descent. In some cases (a)identifying the font associated with the first plurality of glyphsfurther includes identifying a plurality of fonts; and (b) determiningthe maximum dimension associated with the second plurality of glyphsfurther includes determining a maximum dimension associated with allglyphs that comprise the plurality of fonts. In some cases the userinput that defines the textual content segment includes graphicalhighlighting that identifies the textual content segment.

Another example embodiment provides a background shading system. Thesystem includes a memory device. The system further includes a processorthat is operatively coupled to the memory device. The processor isconfigured to execute instructions stored in the memory device that,when executed, cause the processor to carry out a process for applyingbackground shading to textual content. The process includes identifyingtext that is to be located within a region of background shading. Thetext includes a plurality of glyphs, each of which is positioned withinan embox. The emboxes form a frame grid. The process further includesreceiving user input that defines a boundary of the region of backgroundshading. The boundary is defined with reference to a feature common to agroup of the emboxes that are positioned along an edge of the framegrid. The feature is independent of the glyphs contained within theemboxes. The process further includes applying background shading to theregion of background shading. In some cases (a) the feature is a topedge of the emboxes that are positioned along a top edge of the framegrid; and (b) the boundary is a top edge of the region of backgroundshading. In some cases (a) the feature is a bottom edge of the emboxesthat are positioned along a bottom edge of the frame grid; and (b) theboundary is a bottom edge of the region of background shading. In somecases (a) the feature is a centerline of the emboxes that are positionedalong the edge of the frame grid; and (b) the boundary is selected froma group consisting of a top edge of the region of background shading anda bottom edge of the region of background shading.

Another example embodiment provides a computer program product encodedwith instructions that, when executed by one or more processors, cause aprocess for applying background shading to textual content to be carriedout. The process includes receiving first user input that identifiestextual content. The process further includes receiving second userinput that at least partially defines a boundary of a region ofbackground shading. The second user input is distinct from the firstuser input. The process further includes displaying the identifiedtextual content and background shading in the region of backgroundshading. In some cases (a) the identified textual content includes aplurality of glyphs, each of which is positioned within an embox, theemboxes forming a frame grid; and (b) the second user input defines theboundary with respect to a feature common to a group of the emboxes thatare positioned along an edge of the frame grid, wherein the feature isindependent of the glyphs contained within the emboxes. In some cases(a) the identified textual content includes a plurality of glyphs, eachof which is positioned within an embox, the plurality of emboxes forminga frame grid; and (b) the second user input defines the boundary withrespect to a centerline of a group of emboxes that are positioned alongan edge of the frame grid. In some cases the second user input definestop and bottom boundaries of the region of background shading in termsof a distance from first and last lines, respectively, of the identifiedtextual content. In some cases (a) the second user input defines top andbottom boundaries of the region of background shading in terms of adistance from first and last lines, respectively, of the identifiedtextual content; and (b) the distance depends on a maximum dimension ofglyphs comprising a font that forms part of the identified textualcontent. In some cases the second user input defines left and rightboundaries of the region of background shading in terms of a width of acolumn that is formed by the identified textual content.

The foregoing description has been presented for the purposes ofillustration and description. It is not intended to be exhaustive or tolimit the disclosure to the particular described embodiments. Thereforemany modifications and variations are possible in light of thisdisclosure. Thus it is intended that the scope of the invention belimited not by this detailed description, but rather by the claimsappended hereto.

What is claimed is:
 1. A non-transitory computer readable medium encodedwith instructions that, when executed by one or more processors, cause aprocess for applying background shading to textual content to be carriedout, the process comprising: receiving user input that defines a textualcontent segment that is to be located within a region of backgroundshading, wherein the textual content segment comprises a first set ofone or more glyphs arranged in one or more lines; identifying a fontassociated with the first set of one or more glyphs, wherein theidentified font comprises a second set of glyphs; determining a maximumdimension associated with the second set of glyphs; positioning aboundary of the region of background shading at a distance from abaseline of a particular one of the one or more lines, wherein thedistance is based on the determined maximum dimension; and displayingbackground shading in the region of background shading.
 2. Thenon-transitory computer readable medium of claim 1, wherein: thedetermined maximum dimension is a maximum ascent associated with thesecond set of glyphs; the distance is substantially equal to the maximumascent plus a baseline increment; and the baseline increment representsan incremental distance between baselines of two sequential lines of thetextual content segment.
 3. The non-transitory computer readable mediumof claim 1, wherein: the determined maximum dimension is a maximumdescent associated with the second set of glyphs; positioning theboundary further comprises positioning a bottom boundary of the regionof background shading at the distance below the baseline of a last lineof the textual content segment; and the distance is substantially equalto the maximum descent.
 4. The non-transitory computer readable mediumof claim 1, wherein the first set of glyphs comprises a plurality ofglyphs.
 5. The non-transitory computer readable medium of claim 1,wherein: the textual content segment extends across a plurality of textcolumns; and the boundary of the region of background shading is ahorizontal line that extends across two or more of the text columns. 6.A background shading system that comprises a memory device and aprocessor that is operatively coupled to the memory device, wherein theprocessor is configured to execute instructions stored in the memorydevice that, when executed, cause the processor to carry out a processfor applying background shading to textual content, the processcomprising: receiving user input that defines a textual content segmentthat is to be located within a region of background shading, wherein thetextual content segment comprises a selected glyph that is positionedadjacent to a baseline; identifying a font associated with the selectedglyph, wherein the identified font comprises a plurality of glyphs;determining a maximum dimension associated with the plurality of glyphs;positioning a boundary of the region of background shading at a distancefrom the baseline, wherein the distance is based on the determinedmaximum dimension; and displaying background shading in the region ofbackground shading.
 7. The background shading system of claim 6,wherein: the determined maximum dimension is a maximum ascent associatedwith the plurality of glyphs; the distance is substantially equal to themaximum ascent plus a baseline increment; and the baseline incrementrepresents an incremental distance between baselines of two sequentiallines of the textual content segment.
 8. The background shading systemof claim 6, wherein: the determined maximum dimension is a maximumascent associated with the plurality of glyphs; positioning the boundaryfurther comprises positioning a top boundary of the region of backgroundshading at the distance above the baseline; and the distance issubstantially equal to the maximum ascent.
 9. The background shadingsystem of claim 6, wherein the textual content segment comprises asecond plurality of glyphs arranged along the baseline.
 10. Thebackground shading system of claim 6, wherein the process for applyingbackground shading to textual content further comprises: defining aclipping path that corresponds to a shape of a container object, whereinthe textual content segment is positioned within the container object;and applying the clipping path to a graphics port, wherein displayingthe background shading comprises drawing the background shading on thegraphics port to which the clipping path has been applied.
 11. Acomputer-implemented method for applying background shading to textualcontent, the method comprising: receiving user input that defines atextual content segment that is to be located within a region ofbackground shading, wherein the textual content segment comprises afirst plurality of glyphs arranged in one or more lines; identifying afont associated with the first plurality of glyphs, wherein theidentified font comprises a second plurality of glyphs; determining amaximum dimension associated with the second plurality of glyphs;positioning a boundary of the region of background shading at a distancefrom a baseline of a particular one of the lines, wherein the distanceis based on the determined maximum dimension; and displaying backgroundshading in the region of background shading.
 12. The method of claim 11,wherein: the textual content segment forms part of a digitalpublication; and determining the maximum dimension associated with thesecond plurality of glyphs further comprises accessing a font resourcethat does not form part of the digital publication.
 13. The method ofclaim 11, further comprising: defining a clipping path that correspondsto a shape of a container object, wherein the textual content segment ispositioned within the container object; and applying the clipping pathto a graphics port, wherein displaying the background shading comprisesdrawing the background shading on the graphics port to which theclipping path has been applied.
 14. The method of claim 11, wherein eachglyph in the first plurality of glyphs is also included in the secondplurality of glyphs.
 15. The method of claim 11, wherein displaying thebackground shading further comprises displaying the textual contentsegment over the background shading.
 16. The method of claim 11,wherein: the determined maximum dimension is a maximum ascent associatedwith the second plurality of glyphs; positioning the boundary furthercomprises positioning a top boundary of the region of background shadingat the distance above the baseline of a first line of the textualcontent segment; and the distance is substantially equal to the maximumascent.
 17. The method of claim 11, wherein: the determined maximumdimension is a maximum descent associated with the second plurality ofglyphs; positioning the boundary further comprises positioning a bottomboundary of the region of background shading at the distance below thebaseline of a last line of the textual content segment; and the distanceis substantially equal to the maximum descent.
 18. The method of claim11, wherein: determining the maximum dimension further comprisesdetermining a maximum ascent and a maximum descent associated with thesecond plurality of glyphs; positioning the boundary further comprises(a) positioning a top boundary at a distance above a baseline of a firstline of the textual content segment, and (b) positioning a bottomboundary at a distance below a baseline of a last line of the textualcontent segment; the distance above the baseline of the first line ofthe textual content segment is substantially equal to the maximumascent; and the distance below the baseline of the last line of thetextual content segment is substantially equal to the maximum descent.19. The method of claim 11, wherein: identifying the font associatedwith the first plurality of glyphs further comprises identifying aplurality of fonts; and determining the maximum dimension associatedwith the second plurality of glyphs further comprises determining amaximum dimension associated with all glyphs that comprise the pluralityof fonts.
 20. The method of claim 11, wherein the user input thatdefines the textual content segment comprises graphical highlightingthat identifies the textual content segment.